<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
    <base href="<%=basePath%>">
    <meta charset="utf-8"/>
    <title>版本添加</title>
    <meta name="description" content="overview & stats"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link href="static/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="static/css/bootstrap-responsive.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="static/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="static/css/ace.min.css"/>
    <link rel="stylesheet" href="static/css/ace-responsive.min.css"/>
    <link rel="stylesheet" href="static/css/ace-skins.min.css"/>
    <script type="text/javascript" src="static/js/jquery-1.7.2.js"></script>
    <!--提示框-->
    <script type="text/javascript" src="static/js/jquery.tips.js"></script>
</head>

<script type="text/javascript">
    $(function () {
        top.hangge();
    });

    //保存
    function save() {
        //提交
        $("#menuForm").submit();
        $("#zhongxin").hide();
        $("#zhongxin2").show();
    }
</script>

<body>
<form action="version/add" name="menuForm" id="menuForm" method="post" enctype="multipart/form-data">
    <div id="zhongxin" class="zhongxin-cla">
        <table border="1" style="text-align: center;">
            <thead>
            <tr>
                <th style="width: 15%;">平台</th>
                <th style="width: 7%;">版本码</th>
                <th style="width: 7%;">版本号</th>
                <th style="width: 16%;">安卓更新链接</th>
                <th style="width: 16%;">安卓更新说明</th>
                <th style="width: 7%;">iOS版本号</th>
                <th style="width: 16%;">iOS更新链接</th>
                <th style="width: 16%;">iOS更新说明</th>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${data.versions}" var="version">
                <tr>
                    <td>${version.name}</td>
                    <td>
                        <input type="text" value="${version.version_code.value}" name="${version.version_code.name}">
                    </td>
                    <td>
                        <input type="text" value="${version.version.value}" name="${version.version.name}">
                    </td>
                    <td>
                        <input type="text" value="${version.url.value}" name="${version.url.name}">
                    </td>
                    <td>
                        <input type="text" value="${version.android_content.value}"
                               name="${version.android_content.name}">
                    </td>
                    <td>
                        <input type="text" value="${version.ios_version.value}" name="${version.ios_version.name}">
                    </td>
                    <td>
                        <input type="text" value="${version.ios_url.value}" name="${version.ios_url.name}">
                    </td>
                    <td>
                        <input type="text" value="${version.ios_content.value }" name="${version.ios_content.name }">
                    </td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
        <div class="form-group" style=" margin-top: 10px;">
            <label class="col-sm-3 control-label">
                备注：
            </label>
            <input name="remark" style="width:60%" type="text" placeholder="版本更新备注">
        </div>
        <div class="modal-footer">
            <a class="btn btn-mini btn-primary" onclick="save();">保存</a>
            <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a>
        </div>
    </div>
</form>
</body>
</html>